package com.kurt.dto.create;

import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 数据权限创建请求DTO
 * 用于接收创建数据权限的请求参数
 */
@Data
public class DataPermissionCreateRequest extends BaseCreate {

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    /**
     * 实体类型
     */
    @NotNull(message = "实体类型不能为空")
    private String entityType;

    /**
     * 资源ID
     */
    @NotNull(message = "资源ID不能为空")
    private Long resourceId;

    public DataPermissionCreateRequest(Long userId, String entityType, Long resourceId) {
        this.userId = userId;
        this.entityType = entityType;
        this.resourceId = resourceId;
    }
}
